package com.suppor.rpc.proto.serialization;

public enum SerializationTypeEnum {
    HESSIAN(0x10),
    JSON(0x20);

    private Integer type;

    SerializationTypeEnum(Integer type) {
        this.type = type;
    }

    public static SerializationTypeEnum findType(byte serializationType) {
        for (SerializationTypeEnum value : SerializationTypeEnum.values()) {
            if (value.getType() == serializationType) {
                return value;
            }
        }
        return HESSIAN;
    }

    public Integer getType() {
        return type;
    }
}
